<h1>Listing tourplans</h1>

<table>
  <tr>
    <th>Name</th>
    <th>User</th>
  </tr>

<% @tourplans.each do |tourplan| %>
  <tr>
    <td><%=h tourplan.name %></td>
    <td><%=h tourplan.user_id %></td>
    <td><%= link_to 'Show', tourplan %></td>
    <td><%= link_to 'Edit', edit_tourplan_path(tourplan) %></td>
    <td><%= link_to 'Destroy', tourplan, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New tourplan', new_tourplan_path %>